import { createApp } from "vue";
import { createPinia } from "pinia";

import App from "./App.vue";
import router from "./router";

// import "./assets/main.css";

// 1. 引入你需要的组件
import {
  Icon,
  Search,
  Swipe,
  SwipeItem,
  Image as VanImage,
  Circle,
  Lazyload,
  Sidebar,
  SidebarItem,
} from "vant";
// 2. 引入组件样式
import "vant/lib/index.css";

// 3. 注册你需要的组件

const app = createApp(App);

app.use(createPinia());
app.use(router);

app.use(Icon);
app.use(Search);
app.use(Swipe);
app.use(SwipeItem);
app.use(VanImage);
app.use(Circle);
app.use(Lazyload);
app.use(Sidebar);
app.use(SidebarItem);

import { VueMasonryPlugin } from "vue-masonry";

app.use(VueMasonryPlugin);

// import mitt from "mitt";
// const emitter = mitt();
// app.config.globalProperties.emitter = emitter;

app.mount("#app");
